package com.service.merchant.domain;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

import com.service.merchant.key.MerchantKey;


public class Merchant
{
	private int id;
    
	private String name;
	
    private Timestamp modifiedTime;
    
    private Map<MerchantKey, MerchantAttribute> attributes = new HashMap<MerchantKey, MerchantAttribute>();
 
 	public Merchant()
	{
	}
	
 	
	public int getId()
	{
		return id;
	}
	
	public void setId(int id)
	{
		this.id = id;
	}
	
	public String getName()
	{
		if(name == null)
			return name;
		else
			return name.trim();
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public Timestamp getModifiedTime()
	{
		return modifiedTime;
	}
	
	public void setModifiedTime(Timestamp modifiedTime)
	{
		this.modifiedTime = modifiedTime;
	}
	
	public void putAttribute(MerchantKey key, MerchantAttribute tagAttri)
	{
		attributes.put(key, tagAttri);
	}
	
	public Map<MerchantKey, MerchantAttribute> getAttributes()
	{
		return attributes;
	}
}
